package com.wkk.websocket.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author : WangKeKe
 * @date : 2020/9/30 14:54
 * Description : 公告数据库映射
 */

@Data
@Accessors(chain = true)
@ApiModel(description = "公告消息")
@TableName("no_message_announcement")
public class Announcement implements Serializable {

    private static final long serialVersionUID = 2L;

    @ApiModelProperty("主键")
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty("公告内容")
    private String content;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "公告发送时间")
    private Date createTime;

    @ApiModelProperty(value = "创建者ID")
    private String createBy;

    @ApiModelProperty(value = "公告类型")
    private String type;

    @ApiModelProperty(value = " 消息状态\n" +
            "     * 0 : 未发送\n" +
            "     * 1 : 发送成功\n" +
            "     * -1 : 发送失败")
    private Integer status;

    @ApiModelProperty(value = "消息发送失败原因")
    private String failCause;

    @ApiModelProperty(value = "逻辑删除")
    private Integer deleted;
}
